<?php if (!defined('THINK_PATH')) exit();?><div class="bjui-pageHeader">
	<div class="pull-right">
		<button class="btn-default" data-icon="plus" title="增加配送方式" data-toggle="tooltip" data-placement="left" onclick="createDialog('<?php echo U("Forms/freights");?>', '新增配送方式', 'freights',{width:800, height:600});" ></button> 
		<!-- <div class="btn-group">
			<button type="button" class="btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" ><span class="caret"></span></button>
			<ul class="dropdown-menu">
				<li><a href="<?php echo U('Block/del_exp');?>" data-toggle="doajaxchecked" data-callback="callbackRefres" data-confirm-msg="要全部删除所选中的快递吗??" data-idname="id" data-group="ids">全部删除</a></li>
			</ul>
		</div> -->
		<button class="btn-default" onclick="$.CurrentNavtab.navtab('refresh')" title="刷新本页" data-toggle="tooltip" data-placement="left" data-icon="refresh"></button>
	</div>
	 <form id="pagerForm" data-toggle="ajaxsearch" data-loadingmask="true" action="<?php echo U('freights');?>" method="post">
		<input type="hidden" name="pageSize" value="<?php echo I('param.pageSize');?>" />
        <input type="hidden" name="pageCurrent" value="<?php echo I('param.pageCurrent');?>" />
        <input type="hidden" name="orderField" value="<?php echo I('param.orderField');?>" />
        <input type="hidden" name="orderDirection" value="<?php echo I('param.orderDirection');?>" />
        <div class="bjui-searchBar">
        	<label>状态:</label>
        	<select name="status" data-toggle="selectpicker">
        		<option value="">全部</option>
        		<option value="0" <?php if($_REQUEST['status'] == '0'): ?>selected="selected"<?php endif; ?>>正常</option>
        		<option value="1" <?php if($_REQUEST['status'] == '1'): ?>selected="selected"<?php endif; ?>>已禁用</option>
        	</select>
        	<label>名称:</label>
        	<input type="text" name="name" class="w200" value="<?php echo I('name');?>"/>
        	<button type="submit" class="btn-default" data-icon="search">查询</button>
	        <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">清空查询</a>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
	<table class="table table-bordered table-hover table-striped table-top" data-selected-multi="false">
		<thead>
			<tr>
				<th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
				<th>名称</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
				<td><input type="checkbox" value="<?php echo ($vo["id"]); ?>" class="checkboxCtrl" name="ids" data-toggle="icheck"></td>
			 	<td><?php echo ($vo["name"]); ?></td>
			 	<?php if($vo["status"] == '0'): ?><td><a href="<?php echo U('Forms/update_freights',array('id'=>$vo['id']));?>" data-toggle="doajax" data-type="get" data-confirm-msg="确定要禁用<?php echo ($vo["name"]); ?>?" >开启</a></td>
			 	<?php else: ?>
			 	<td><a href="<?php echo U('Forms/update_freights',array('id'=>$vo['id']));?>" data-toggle="doajax" data-type="get" data-confirm-msg="确定要启用用<?php echo ($vo["name"]); ?>?" >禁用</a></td><?php endif; ?>
			 	<td>
			 		<button type="button" class="btn-warning btn-xs" onclick="createDialog('<?php echo U("Forms/freights", array("id"=>$vo[id]));?>','修改<?php echo ($vo["name"]); ?>', 'frights',{width:800, height:600})">改</button>
			 		<button type="button" class="btn-danger btn-xs" data-toggle="doajax" data-confirm-msg="确定要删除<?php echo ($vo["name"]); ?>?" data-type="get" data-url="<?php echo U('Forms/del_freights',array('id'=>$vo['id']));?>">删</button>
			 	</td>
			 </tr><?php endforeach; endif; else: echo "" ;endif; ?>
		</tbody>
	</table>
</div>

<div class="bjui-pageFooter">
		
	<?php if(page == save): ?><ul>
			<li><button type="submit" class="btn-default" data-icon="save">保存</button></li>
	        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
	    </ul>
	<?php elseif(page == close): ?>
	    <ul>
	        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
	    </ul>
	<?php elseif(page == page and $show != null): ?>
		<ul>
	        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
	    </ul>
		    <div class="pages">
		        <span>每页&nbsp;</span>
		        <div class="selectPagesize">
		            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
		                <option value="<?php echo ($show['listrow']); ?>"><?php echo ($show['listrow']); ?></option>
		                <option value="60">60</option>
		                <option value="120">120</option>
		                <option value="150">150</option>
		            </select>
		        </div>
		        <span>&nbsp;条，共 <?php echo ($show['total']); ?> 条</span>
		    </div>
		    <div class="pagination-box" data-toggle="pagination" data-total="<?php echo ($show['total']); ?>" data-page-size="<?php echo ($show['listrow']); ?>" data-page-current="1">
		    </div>
	<?php elseif(page == page and $show == null): ?>
		<ul>
			<li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
		</ul>
	<?php else: ?>
		<ul>
			<li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
		</ul><?php endif; ?>

</div>